<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <?php include_http_metas() ?>
        <?php include_metas() ?>
        <?php include_title() ?>
        <link rel="shortcut icon" href="/favicon.ico" />
        <?php include_stylesheets() ?>
        <?php include_javascripts() ?>
    </head>
    <body>

        <?php
        if ($sf_context->getModuleName() == "login") {
            echo $sf_content;
        } else {
            ?>

            <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container-fluid">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="#">Decameron System</a>
                    </div>
                    <div id="navbar" class="navbar-collapse collapse">
                        <ul class="nav navbar-nav navbar-right">
                            <li><a href="<?php echo url_for("home/index"); ?>"><span class="glyphicon glyphicon-cog"></span> Configuracion</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-user"></span> Perfil</a></li>
                            <li><a href="#"><span class="glyphicon glyphicon-question-sign"></span> Ayuda</a></li>
                        </ul>
                        <form class="navbar-form navbar-right">
                            <input type="text" class="form-control" placeholder="Buscar...">
                        </form>
                    </div>
                </div>
            </nav>

            <div class="container-fluid">
                <div class="row">
                    <div class="col-sm-3 col-md-2 sidebar">
                        <ul class="nav nav-sidebar">
                            <li <?php echo $sf_context->getModuleName() == "home" ? "class='active'" : ""; ?>>
                                <a href="<?php echo url_for("home/index"); ?>">1. Inicio / Configuracion</a>
                            </li>
                        </ul>

                        <ul class="nav nav-sidebar">
                            <li <?php echo $sf_context->getModuleName() == "registrar_cliente" ? "class='active'" : ""; ?>>
                                <a href="<?php echo url_for("registrar_cliente/index"); ?>">2. Registrar Cliente</a>
                            </li>
                            <li <?php echo $sf_context->getModuleName() == "registrar_empleado" ? "class='active'" : ""; ?>>
                                <a href="<?php echo url_for("registrar_empleado/index"); ?>">3. Registrar Empleado</a>
                            </li>
                        </ul>

                        <ul class="nav nav-sidebar">
                            <li <?php echo $sf_context->getModuleName() == "buscar" ? "class='active'" : ""; ?>>
                                <a href="<?php echo url_for("buscar/index"); ?>">4. Buscar / Reservar Habitacion</a>
                            </li>
                            <li <?php echo $sf_context->getModuleName() == "reservacion_lista" ? "class='active'" : ""; ?>>
                                <a href="<?php echo url_for("reservacion_lista/index"); ?>">5. Reservaciones</a>
                            </li>
                        </ul>
                    </div>
                    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                        <?php echo $sf_content ?>
                    </div>
                </div>
            </div>

        <?php } ?>

    </body>
</html>
